package com.yuwei.live

import com.yuwei.common.BaseApiService
import com.yuwei.common.entity.AddCarEntity
import com.yuwei.common.entity.Res
import com.yuwei.live.entity.BannerEntity
import com.yuwei.database.entity.GoodsEntity
import com.yuwei.live.entity.LiveEntity
import com.yuwei.live.entity.RankingEntity
import kotlinx.coroutines.flow.Flow
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface LiveApiService: BaseApiService {
    @GET("/videosimple/getRecommendSimpleVideo")
    fun getLiveList(@Query("page") page: Int, @Query("pagesize") pageSize: Int): Flow<Res<LiveEntity>>
    @GET("/liveRoom/getOrderHotList")
    fun getRankingList(): Flow<Res<RankingEntity>>
    @GET("/goodsHome/cmallBannerInfo")
    fun getBannerList(): Flow<Res<BannerEntity>>
    @GET("/goods/info?category_id=0&currentPage=1&pageSize=15&room_id=0")
    fun getGoodsList(): Flow<Res<GoodsEntity>>
    //添加购物车
    @POST("/goods/addCar")
    fun addCar(@Body addCarBody: AddCarEntity):Flow<Res<String>>
}